﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Demos.Threads.Services;

namespace Demos.Threads
{
    public class SingleThread
    {

        public static void Start()
        {
            //创建线程
            Thread thread = new Thread(new ThreadStart(Test1));
            //运行线程
            thread.Start();
        }

        static void Test1()
        {
            var list = new UserService().GetList();
            System.Console.WriteLine($"查询用户信息列表返回：{JsonSerializer.Serialize(list)}");
            System.Console.WriteLine("---------------------------------------------------------");
        }



    }
}
